package com.juzi.string;

import java.util.Scanner;

/**
    练习题：手机号码打星号
 */

public class StringExec8 {
    public static void main(String[] args) {
        //1、键盘录入手机号码
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号码");
        String tel = sc.next();

        //2、截取手机号码的前三位，后四位
        String before = tel.substring(0,3); //取前三位
        String after = tel.substring(7);    //从索引第7位开始一直到末尾

        String s = before + "****" + after;
        System.out.println(s);
    }

}
